Support MSYS2 UCRT64 environment#308
Merged
vedang merged 3 commits intovedang:masterfrom Dec 28, 2025
Merged
Conversation
MinGW’s compiler (GCC 14.2.0) errors out compiling `synctex_parser.c`.
```
synctex_parser.c: In function '_synctex_updater_print_gz':
synctex_parser.c:8448:13: error: implicit declaration of function
'vasprintf'; did you mean 'vsprintf'?
8448 | if (vasprintf(&buffer, format, va) < 0) {
| ^~~~~~~~~
| vsprintf
```
`vasprintf` is a custom function (not the standard `vsprintf`) that’s
defined in the same translation unit a few lines above.
However its definition is wrapped within a `if defined(_MSC_VER)`
i.e. it’s only enabled when compiled with MSVC compiler. This fix
enables it also for MinGW compilers.
`vasprintf` is a function available on Linux and macOS but not in Windows. Instead of restricting it for MSVC and MinGW, enable it for all compilers using standard C library function `vsnprintf`.
UCRT64 is the newer MSYS2 environment compared to MINGW{32,64}. This
is the recommended default [1].
> If you are unsure, go with UCRT64.
[1]: https://www.msys2.org/docs/environments/
Contributor
Author
|
Note: This PR is a superset of #295. |
|
works like a charm, would love to see it in master/melpa version |
|
same as CommanderAsdasd : works for me, would love to see it in master/melpa version |
|
Same here. It works for me, would love to see it in master/melpa version. |
|
Thanks @legends2k! Though it seems to cause a problem when double-clicking a word (using it with Org-noter)? |
svraka
added a commit
to svraka/MINGW-packages
that referenced
this pull request
Jan 21, 2026
Previous workaround for `vasprintf` was fixed upstream [1] [1]: vedang/pdf-tools#308
ognevny
pushed a commit
to msys2/MINGW-packages
that referenced
this pull request
Jan 21, 2026
Previous workaround for `vasprintf` was fixed upstream [1] [1]: vedang/pdf-tools#308
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UCRT64 is the newer MSYS2 environment compared to MINGW{32,64}. This
is the recommended default 1.